package org.dinqy;

import static org.dinqy.PredicateType.Equal;
import static org.dinqy.PredicateType.GreaterThan;
import static org.dinqy.PredicateType.GreaterThanEquals;
import static org.dinqy.PredicateType.IsNotNull;
import static org.dinqy.PredicateType.IsNull;
import static org.dinqy.PredicateType.LessThan;
import static org.dinqy.PredicateType.LessThanEquals;
import static org.dinqy.PredicateType.Like;
import static org.dinqy.PredicateType.NotEqual;

/**
 * @author armandino (at) gmail.com
 */
public final class Criteria {
    
    private Criteria() {}
    
    public static Criterion greaterThanEquals(Comparable<?> value) {
        return new Criterion(GreaterThanEquals, value);
    }
    
    public static Criterion greaterThan(Comparable<?> value) {
        return new Criterion(GreaterThan, value);
    }
    
    public static Criterion lessThanEquals(Comparable<?> value) {
        return new Criterion(LessThanEquals, value);
    }
    
    public static Criterion lessThan(Comparable<?> value) {
        return new Criterion(LessThan, value);
    }
    
    public static Criterion notEqual(Comparable<?> value) {
        return new Criterion(NotEqual, value);
    }
    
    public static Criterion equal(Comparable<?> value) {
        return new Criterion(Equal, value);
    }
    
    public static Criterion like(Comparable<?> value) {
        return new Criterion(Like, value);
    }
    
    public static Criterion isNotNull() {
        return new Criterion(IsNotNull);
    }
    
    public static Criterion isNull() {
        return new Criterion(IsNull);
    }

}
